/**
 * Collaborative Story Development Web Application (CSDApp) 
 * Copyright Anton Strack 2014
 *
 * This file is part of Collaborative Story Development Application (CSDApp).
 *
 * CSDApp is free software: you can redistribute it and/or modify it under the
 * terms of the GNU General Public License as published by the Free Software
 * Foundation, either version 3 of the License, or any later version.
 *
 * CSDApp is distributed in the hope that it will be useful, but WITHOUT ANY
 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
 * A PARTICULAR PURPOSE. See the GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License along with
 * CSDApp. If not, see <http://www.gnu.org/licenses/>.
 *
 */
package csdwa;

import java.sql.Timestamp;

/**
 * This class keeps track of a user's history relating to a single resource that
 * implements CsdwaRecordable.
 *
 * @author Anton Strack
 */
public class UserHistory extends Resource {

    protected int postId;
    protected int postStateId;
    protected int postResourceTypeId;
    protected int userId;
    protected int actionTypeId;
    protected String postName;
    protected String userName;
    protected Timestamp historyDate;

    public UserHistory() {
        // super();
    }

    public UserHistory(int resourceTypeId) {
        super(resourceTypeId);
    }

    /**
     * @return the postId
     */
    public int getPostId() {
        return postId;
    }

    /**
     * @param postId the postId to set
     */
    public void setPostId(int postId) {
        this.postId = postId;
    }

    /**
     * @return the postStateId
     */
    public int getPostStateId() {
        return postStateId;
    }

    /**
     * @param postStateId the postStateId to set
     */
    public void setPostStateId(int postStateId) {
        this.postStateId = postStateId;
    }

    /**
     * @return the postResourceTypeId
     */
    public int getPostResourceTypeId() {
        return postResourceTypeId;
    }

    /**
     * @param postResourceTypeId the postResourceTypeId to set
     */
    public void setPostResourceTypeId(int postResourceTypeId) {
        this.postResourceTypeId = postResourceTypeId;
    }

    /**
     * @return the userId
     */
    public int getUserId() {
        return userId;
    }

    /**
     * @param userId the userId to set
     */
    public void setUserId(int userId) {
        this.userId = userId;
    }

    /**
     * @return the postName
     */
    public String getPostName() {
        return postName;
    }

    /**
     * @param postName the postName to set
     */
    public void setPostName(String postName) {
        this.postName = postName;
    }

    /**
     * @return the historyDate
     */
    public Timestamp getHistoryDate() {
        return historyDate;
    }

    /**
     * @param historyDate the historyDate to set
     */
    public void setHistoryDate(Timestamp historyDate) {
        this.historyDate = historyDate;
    }

    /**
     * @return the userName
     */
    public String getUserName() {
        return userName;
    }

    /**
     * @param userName the userName to set
     */
    public void setUserName(String userName) {
        this.userName = userName;
    }

    /**
     * @return the actionTypeId
     */
    public int getActionTypeId() {
        return actionTypeId;
    }

    /**
     * @param actionTypeId the actionTypeId to set
     */
    public void setActionTypeId(int actionTypeId) {
        this.actionTypeId = actionTypeId;
    }

    @Override
    public String toString() {
        return "PostHistory{" + "postId=" + postId + ", postStateId=" + postStateId + ", postResourceTypeId=" + postResourceTypeId + ", userId=" + userId + ", actionTypeId=" + actionTypeId + ", postName=" + postName + ", userName=" + userName + ", historyDate=" + historyDate + '}';
    }
}
